import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import axios from "axios";
import ElementUI from "element-ui";
import * as Echarts from "echarts";

import "@/assets/theme/chalk";
import "@/assets/theme/vintage";
import "@/assets/font/iconfont.css";
import SocketService from "@/utils/socket_service";

import "element-ui/lib/theme-chalk/index.css";
import "@/assets/css/global.less";
Vue.use(ElementUI);

// 调用类,并建立连接
SocketService.Instance.connect();
// 绑定到Vue原型上
Vue.prototype.$socket = SocketService.Instance;
axios.defaults.baseURL = "http://127.0.0.1:8888/api/";
// 将axios挂载到Vue的原型对象上
Vue.prototype.$http = axios;

//现在public的index中引入echarts
//在window的身上就会有一个echarts属性
// 在此处可以将echarts放到Vue的原型对象上

Vue.prototype.$echarts = Echarts;

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
